package be.jprojects.subscription.controllers;

import java.util.HashMap;
import java.util.Map;

public class LanguageController {
	private static LanguageController instance;
	private Map<String, String> dictionnary;
	
	private LanguageController() {
		dictionnary = new HashMap<String, String>();
	}

	public static LanguageController getInstance() {
		if (instance == null)
			instance = new LanguageController();
		return instance;
	}
	
	public String translate(String toTranslate) {
		if (dictionnary == null || dictionnary.size() == 0)
			return toTranslate;
		else
			return dictionnary.get(toTranslate);
	}

}
